<script>
$(function() {
	$( ".datepick" ).datepicker({
								 changeMonth: true,
								dateFormat: "yy-mm-dd",
								showOn: "both",
								buttonImage:$('#root').val()+"img/calendar.jpg",
								buttonImageOnly: true
	 							});
	$(".datepick").keydown(function(e) {
        if ( e.keyCode != 13) {}
        else 
            {
                e.preventDefault(); 
            }   
        }
    );
});
</script>
<?php
	echo $form->create('Kqbanhangtt');
	echo $form->input('root',array('id'=>'root','type'=>'hidden','value'=>$this->webroot));
		echo "<div width=100> "; 
		echo $this->Form->input('ngay',array('type'=>'text','label'=>false,'class'=>'datepick'));
		echo "</div>";
	echo "<div id='kq'></div>";
	$this->Js->get('.datepick')->event('change',
								$this->Js->request(array('controller' => 'kqbanhangtts', 'action' => 'kqngay',$donvi_id),
								array('update' => '#kq','async' => true,
								'dataExpression' => true,'method' => 'post',
								'data' => $js->serializeForm(array('isForm' => false, 'inline' => true)))));
	echo $form->end();